<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    
    <div style="margin:10px 10px 10px 10px">
    	<p>提示：</p>
    	<p>1，本列表展示支持的所有交易对及精度</p>
    	<p>2，价格精度位数（0为个位，ethbtc, etcbtc, bchbtc, ltcbtc 除外，这四个交易对的精度固定为4位 ）</p>
    	<p>3，数量精度位数（0为个位，指  "基础币种"数量）</p>
    	<p>4，交易区（main：主区，innovation：创新区，bifurcation：分叉区）</p>
    </div>
	<table  id="symbols"></table>

	<div id="symbols-tb" style="padding:5px;height:auto">
		<div>
			交易对: <input id="symbol" class="easyui-textbox" style="width:80px">
			交易区: 
			<select id="symbolPartition" class="easyui-combobox" panelHeight="auto" style="width:100px">
				<option value="main">main</option>
				<option value="innovation">innovation</option>
				<option value="bifurcation">bifurcation</option>
			</select>
			<a href="#" class="easyui-linkbutton" iconCls="icon-search" id="search">模糊查询</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()">清除条件</a>
		</div>
	</div>
	
	<script>
	
	$("#symbols").datagrid({
		title:"交易对列表",
		singleSelect:false,
		collapsible:true,
		pagination:true,
		method:'get',
		url:'/common/getLocalSymbols',
		pageSize:20,
		toolbar:'#symbols-tb',
	    columns:[[    
	        {field:'symbol',title:"交易对",width:100,sortable:true},    
	        {field:'baseCurrency',title:"基础币种",width:100,sortable:true},    
	        {field:'quoteCurrency',title:"计价币种",width:100,sortable:true},    
	        {field:'pricePrecision',title:"价格精度位数（小数点后位数）",width:200},    
	        {field:'amountPrecision',title:"数量精度位数（小数点后位数）",width:200},   
	        {field:'symbolPartition',title:"交易区",width:100}    
	    ]]    
	});
	
	
	
	$("#search").click(function(){
		
		var symbol = $("#symbol").val();
		var symbolPartition = $("#symbolPartition").val();
		$('#symbols').datagrid('load',{
			symbol: symbol,
			symbolPartition: symbolPartition
		});
	})
	function clearForm(){
			$('#symbols-tb').form('clear');
	}


	
	</script>